//
//  SQCheckRecordTableViewCell.m
//  energy
//
//  Created by 周曼迪 on 2021/7/15.
//

#import "SQCheckRecordTableViewCell.h"

#import "SQCheckRecordModel.h"

#import "NSString+NCDate.h"

@implementation SQCheckRecordTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

+(CGFloat)cellHeight:(BaseModel *)model{
    return W(120);
}

-(void)setModel:(BaseModel<BaseCellModelProtocol> *)model{
    SQCheckRecordModelData * modelData = model;
    self.lab_name.text = modelData.ir_ipm_name;
    self.lab_time.text = [NSString formateDateToDay:[modelData.ir_date substringWithRange:NSMakeRange(6,13)]];
    if ([modelData.ir_hidden_trouble isEqualToString:@"1"]) {
        self.lab_way.text = @"有隐患";
        self.lab_way.textColor = [UIColor colorNamed:@"ff00Color"];
    }else if ([modelData.ir_hidden_trouble isEqualToString:@"0"]){
        self.lab_way.text = @"无隐患";
        self.lab_way.textColor = [UIColor colorNamed:@"selColor"];
    }
    
    if ([modelData.ir_mode isEqualToString:@"1"]) {
        self.lab_check.text = @"作业检查";
        
    }else if ([modelData.ir_mode isEqualToString:@"0"]){
        self.lab_check.text = @"扫码巡检";
        
    }
//    self.lab_check.text =
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
